package com.lebang.mapper;

import com.lebang.domain.CencesBusMember;
import com.lebang.entity.member.LbbMember;
import com.lebang.example.LbbMemberExample;
import com.lebang.model.cences.CencesCoreDataModel;
import org.apache.ibatis.annotations.Mapper;
import com.lebang.model.statistics.StatisticsMember;
import java.util.List;
import com.lebang.configuration.datasource.DataSource;
import com.lebang.model.vo.buss.MemberListVo;
import org.apache.ibatis.annotations.Param;
import java.time.LocalDateTime;
import java.util.Map;
import com.lebang.model.vo.buss.MemberSearchVo;
import com.lebang.model.cences.OsCencesModel;
import com.lebang.model.cences.BrandRegisterCount;

/**
 * LbbMemberMapper继承基类
 */
@Mapper
public interface LbbMemberMapper extends MyBatisBaseDao<LbbMember, Long, LbbMemberExample> {

    void updateByPhone(String phone);

    int insertDelSelective(LbbMember record);

    LbbMember getMember(LbbMember member);

    List<MemberListVo> pagging(@Param("vo") MemberSearchVo vo);

    String checkMemberByMemberId(String userid);

    List<String> selectMasterMemberIdList(String masterPhone);

    int checkIpAddr(@Param("ipAddr") String ipAddr, @Param("appStore") String appStore);

    LbbMember selectById(String memberId);

    List<String> selectBrand();

    LbbMember getMemberByMemberIdAndVersion(@Param("memberId") String memberId, @Param("inviteVersion") int inviteVersion);

    int resisterMemberCount(@Param("star") LocalDateTime star, @Param("end") LocalDateTime end);

    List<StatisticsMember> selectAllAppStoreMemberCount(@Param("star") LocalDateTime star, @Param("end") LocalDateTime end, @Param("type") int type);

    LbbMember selectByPhone(String phone);

    List<String> selectMemberListName();

    void updateIdCardByIdCard(@Param("idCard") String idCard);

    long count(@Param("search") String search, @Param("weixin") String weixin, @Param("alipay") String alipay, @Param("appId") String appId, @Param("memberId") String memberId);

    LbbMember getByinviteCode(String inviteCode);

    LocalDateTime selectCreaTimeByMemberId(String memberId);

    List<String> selectAllMember();

    void closeMemberId(@Param("id") Integer id, @Param("status") String status);

    Integer countByICard(@Param("icard") String icard, @Param("type") Integer type);

    int updateIdCard(@Param("memberId") String memberId, @Param("idCard") String idCard, @Param("name") String name);

    Integer total(@Param("vo") MemberSearchVo vo);

    int updateAllmemberInfoBymemberId(@Param("trueid") String successNewmemberId, @Param("falseid") String badMemberId);

    List<OsCencesModel> countOsVersionRegister(@Param("star") LocalDateTime star, @Param("end") LocalDateTime end, @Param("brand") String brand, @Param("osVersion") String osVersion);

    void updateInviteById(@Param("memberId") String memberId, @Param("inviteId") String inviteId, @Param("inviteVersion") Integer inviteVersion);

    void updateNoticeCountByMemberId(String memberId);

    List<BrandRegisterCount> selectAppStoreMemberCount(@Param("star") LocalDateTime star, @Param("end") LocalDateTime end);

    LbbMember selectMemberByCode(String inviteCode);

    int countByImei(String imei);

    int checkImei(@Param("imei") String imei);

    List<LbbMember> getInviters(@Param("memberId") String memberId, @Param("appid") String appid);

    String selectPhoneByMemberId(@Param("memberId") String memberId);

    List<OsCencesModel> countOsRegister(@Param("star") LocalDateTime star, @Param("end") LocalDateTime end, @Param("brand") String brand, @Param("osv") String osv);

    int selectApprentice(String memberId);

    LbbMember getMemberByMemberId(String memberId);

    LbbMember getMemberByPhone(@Param("phone") String phone, @Param("appid") String appid);

    Integer countByMemberTime(@Param("memberId") String memberId, @Param("min") LocalDateTime min, @Param("max") LocalDateTime max);

    int getCountByMemberId(@Param("memberId") String memberId, @Param("min") LocalDateTime min, @Param("max") LocalDateTime max);

    LbbMember selectByImei(@Param("imei") String imei);

    List<Map<String, String>> page(@Param("page") Long page, @Param("limit") Integer limit, @Param("search") String search, @Param("weixin") String weixin, @Param("alipay") String alipay, @Param("appId") String appId, @Param("memberId") String memberId);

    LbbMember selectByOpenId(@Param("openId") String openId);

    int updateByMemberId(@Param("memberId") String userid,@Param("phone") String phone);

    List<String> selectCity();

    List<CencesBusMember> countByTime(@Param("star") LocalDateTime star, @Param("end") LocalDateTime end);

    List<CencesBusMember> selectCityUserByTime(@Param("star") LocalDateTime star, @Param("end") LocalDateTime end);

    int updateStatusByList(@Param("status") String status,@Param("list") List<String> list);

    List<CencesCoreDataModel> resisterMemberCountGroupByAppStore(LocalDateTime star, LocalDateTime end);
}